<html>
<head><meta charset="utf-8"><title>chalk building on stable chalk#207 · z-archived-t-compiler/wg-rls-2.0/chalk · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/index.html">z-archived-t-compiler/wg-rls-2.0/chalk</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html">chalk building on stable chalk#207</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="160706872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160706872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160706872">(Mar 13 2019 at 17:35)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="129457">@Florian Diebold</span>, I left a <a href="https://github.com/rust-lang-nursery/chalk/pull/207#pullrequestreview-214105279" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/207#pullrequestreview-214105279">review of your PR</a>, but I figured maybe we could discuss here (I find it easier to track comments on Zulip than GH). </p>
<p>The only big concern obviously was the matter of the <code>Debug</code> impl (also cc <span class="user-mention" data-user-id="131694">@scalexm</span>, I'd be curious to get your opinion)</p>



<a name="160715340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160715340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160715340">(Mar 13 2019 at 18:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> well, yeah that's annoying; another option would be to:</p>
<ul>
<li>remove the <code>Debug</code> super-trait from <code>Zip</code> and <code>Fold</code></li>
<li>manually implement <code>Debug</code> only for <code>Parameter</code>, <code>ParameterKind&lt;()&gt;</code>, <code>ParameterKind&lt;UniverseIndex&gt;</code></li>
<li>add some <code>Debug</code> bounds everywhere where the code used to rely on the super-trait from <code>Zip</code> and <code>Fold</code></li>
</ul>



<a name="160715438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160715438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160715438">(Mar 13 2019 at 18:36)</a>:</h4>
<p>Ah, that's...maybe a good idea, yeah.</p>



<a name="160715549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160715549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160715549">(Mar 13 2019 at 18:37)</a>:</h4>
<p>or maybe a bit simpler, have a non-parametric impl for <code>Zip</code> and <code>Fold</code>, so they would be implemented only for some concrete <code>ParameterKind&lt;...&gt;</code> types</p>



<a name="160715567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160715567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160715567">(Mar 13 2019 at 18:37)</a>:</h4>
<p>(and leave <code>Debug</code> as a super trait)</p>



<a name="160715623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160715623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160715623">(Mar 13 2019 at 18:38)</a>:</h4>
<p>that would probably work too</p>



<a name="160716857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160716857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160716857">(Mar 13 2019 at 18:50)</a>:</h4>
<p>mmh no actually that wouldn't work so easily because of <code>ParameterKind&lt;EnaVariable&gt;</code> being used in another crate and still needing a <code>Debug</code> impl (<code>EnaVariable</code> being local to that crate)</p>



<a name="160716939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160716939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160716939">(Mar 13 2019 at 18:51)</a>:</h4>
<p>well anyway, I'd be ok for using a new-type around <code>ParameterKind&lt;Ty, Lifetime&gt;</code></p>



<a name="160717224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160717224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160717224">(Mar 13 2019 at 18:54)</a>:</h4>
<p>Another (probably bad) idea: add a third type parameter to <code>ParameterKind</code> that just controls what the Debug implementation does</p>



<a name="160720610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160720610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160720610">(Mar 13 2019 at 19:36)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> yeah that may be nicer indeed</p>



<a name="160720627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160720627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160720627">(Mar 13 2019 at 19:37)</a>:</h4>
<p>I guess we'd have to try implementing that solution to see if it fits well</p>



<a name="160721297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160721297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160721297">(Mar 13 2019 at 19:47)</a>:</h4>
<p>I'll try it out</p>



<a name="160722802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160722802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160722802">(Mar 13 2019 at 20:06)</a>:</h4>
<p>hrm no, it'd require adding a PhantomData to the enum to use the type parameter, and that's a huge disruption :/</p>



<a name="160723603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160723603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160723603">(Mar 13 2019 at 20:17)</a>:</h4>
<p>The newtype doesn't seem so bad (so far)</p>



<a name="160724916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160724916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160724916">(Mar 13 2019 at 20:36)</a>:</h4>
<p>Pushed the newtype variant to the PR.</p>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I don't think implementing <code>iterate_range</code> as an extension trait would work, because of the impl trait?</p>



<a name="160726535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk%20building%20on%20stable%20chalk%23207/near/160726535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/191167-z-archived-t-compiler/wg-rls-2.0/chalk/topic/chalk.20building.20on.20stable.20chalk.23207.html#160726535">(Mar 13 2019 at 20:58)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> I don't think implementing <code>iterate_range</code> as an extension trait would work, because of the impl trait?</p>
</blockquote>
<p>oh, maybe not, yeah, no big deal</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>